#ifndef CCONEXAO_H
#define CCONEXAO_H

#include <QObject>
#include <QNetworkAccessManager>
#include <QNetworkReply>
#include <QDebug>
#include <QTimer>
#include <QNetworkCookie>


class CConexao : public QObject
{
    Q_OBJECT
public:
    explicit CConexao(QObject *parent = 0);
    ~CConexao();
    void Consultar(const QString &url, const QByteArray &data, bool get, const QString &referer);

private:
    QNetworkAccessManager _net;

protected:
    QNetworkCookieJar _jar;

signals:
    void texto(const QByteArray &resp);
    void conteudoBinario(const QString &tipo, const QByteArray &resp);
    void erroConexao();

private slots:
    void termino(QNetworkReply *rep);

public slots:

};

#endif // CCONEXAO_H
